﻿using PF;
using UnityEngine;
using Quaternion = UnityEngine.Quaternion;
using Vector3 = UnityEngine.Vector3;
using ETModel;

namespace ETHotfix {
    [ObjectSystem]
    public class GameUnitAwakeSystem : AwakeSystem<GameUnit, GameObject, UnitInfo> {
        public override void Awake(GameUnit self, GameObject gameObject, UnitInfo unitInfo) {
            self.Awake(gameObject, unitInfo);
        }
    }

    [HideInHierarchy]
    public class GameUnit : Unit {

        /// <summary>
        /// 
        /// </summary>
        /// <param name="gameObject">传进来,GameUnit里负责销毁</param>
        /// <param name="unitInfo"></param>
		public void Awake(GameObject gameObject, UnitInfo unitInfo) {
            Awake(gameObject);

            Position = new Vector3(unitInfo.PosX, unitInfo.PosY, unitInfo.PosZ);
        }
        public override void Dispose() {
            if (this.IsDisposed) {
                return;
            }
            base.Dispose();
        }

    }
}